<?php

namespace Library\Roger;

use Library\Route\Route;
use Library\HttpParams\HttpParams;
use Library\Error\E404;


class App
{
    public static function run()
    {
        // 利用路由找到文件
        // 配置 404 页面
        E404::$default = BASE_PATH . '/Main/View/error/default/404.html';
        // 获取路由文件
        include_once BASE_PATH . '/Config/Route.php';
        // 获取当前访问的路径
        $url = HttpParams::Server('REQUEST_URI');
        $url = explode('?', $url)[0];
        $params = HttpParams::HttpHas();
        $controller = Route::forward($url, $params);

    }
}